<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<link rel="stylesheet" href="css/bootstrap-3.3.7/css/bootstrap.min.css" />
<link rel="stylesheet" href="css/register.css" />
<link rel="stylesheet" href="css/listCommon.css" />
<link rel="stylesheet" href="css/evaluation.css" />
<style>
    .modal-backdrop {
        position: inherit;
    }
</style>
<jsp:include page="../common/nav.jsp"></jsp:include>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="purchaseOrder">
        <div class="formTitle">基本信息</div>
        <div class="trackInfomation">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>编号：</label>
                        <input id="code" name="code" type="text" class="form-control" placeholder="请输入编号" value="${requestScope.purchaseOrder.code}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>公司：</label>
                        <input id="companyName" name="companyName" type="text" class="form-control" placeholder="请输入公司" value="${requestScope.purchaseOrder.companyName}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>供应商：</label>
                        <input id="supplierName" name="supplierName" type="text" class="form-control" placeholder="请输入供应商" value="${requestScope.purchaseOrder.supplierName}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>订单金额：</label>
                        <input id="totalMoney" name="totalMoney" type="text" class="form-control" placeholder="请输入订单金额" value="${requestScope.purchaseOrder.totalMoney}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>已付金额：</label>
                        <input id="amountPaid" name="amountPaid" type="text" class="form-control" placeholder="请输入已付金额" value="${requestScope.purchaseOrder.amountPaid}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>联系人：</label>
                        <input id="linkman" name="linkman" type="text" class="form-control" placeholder="请输入联系人" value="${requestScope.purchaseOrder.linkman}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>联系电话：</label>
                        <input id="tel" name="tel" type="text" class="form-control" placeholder="请输入联系电话" value="${requestScope.purchaseOrder.tel}" disabled>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <span>*</span>
                        <label>送货时间：</label>
                        <input id="date" name="tel" type="text" class="form-control" placeholder="请选择送货时间" value="${requestScope.purchaseOrder.beginDate.concat(' 至 '.concat(requestScope.purchaseOrder.endDate))}" disabled>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="form-group">
                        <span>*</span>
                        <label>收货地址：</label>
                        <textarea id="address" name="address" class="form-control fuyan" rows="3" placeholder="请输入收货地址" style="margin-left: 0" disabled>${requestScope.purchaseOrder.address}</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="formTitle">
            物资信息
        </div>
        <div class="tableWrap">
            <table class="table table-bordered">
                <thead id="subBody">
                <tr>
                    <th width="5%">序号</th>
                    <th>物料编码</th>
                    <th>品牌</th>
                    <th>物资名称</th>
                    <th>型号</th>
                    <th>类目</th>
                    <th>数量</th>
                    <th>单位</th>
                </tr>
                <c:if test="${empty requestScope.purchaseOrder.subs}">
                    <tr id="nothing">
                        <td colspan="8" style="color: #bbbbbb">无物资信息</td>
                    </tr>
                </c:if>
                <c:if test="${not empty requestScope.purchaseOrder.subs}">
                    <c:forEach items="${requestScope.purchaseOrder.subs}" var="sub" varStatus="index">
                        <tr id="${"materialLine".concat(index.count)}">
                            <td id="${"materialNo".concat(index.count)}">${index.count}</td>
                            <td id="${"detailId".concat(index.count)}" style="display: none">${sub.id}</td>
                            <td id="${"materialId".concat(index.count)}" style="display: none">${sub.materialId}</td>
                            <td id="${"materialCode".concat(index.count)}">${sub.materialCode}</td>
                            <td id="${"materialBrand".concat(index.count)}">${sub.materialBrand}</td>
                            <td id="${"materialName".concat(index.count)}">${sub.materialName}</td>
                            <td id="${"materialModel".concat(index.count)}">${sub.materialModel}</td>
                            <td id="${"materialCategory".concat(index.count)}" style="display: none">${sub.materialCategory}</td>
                            <td id="${"materialCategoryName".concat(index.count)}">${sub.materialCategoryName}</td>
                            <td id="${"quantity".concat(index.count)}">${sub.quantity}</td>
                            <td id="${"materialUnit".concat(index.count)}" style="display: none">${sub.materialUnit}</td>
                            <td id="${"materialUnitText".concat(index.count)}">${requestScope.unitMap[sub.materialUnit]}</td>
                        </tr>
                    </c:forEach>
                </c:if>
                </thead>
            </table>
        </div>
        <div class="trackSubmit">
            <button type="button" onclick="history.back(-1);">返回</button>
        </div>
    </div>
</div>
<script src="css/bootstrap-3.3.7/js/jquery-2.1.4.min.js" type="text/javascript" charset="utf-8"></script>
<script src="css/bootstrap-3.3.7/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>